package com.platform;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by zezhiwang on 2017/6/7.
 */
@EnableEurekaServer
@SpringBootApplication
public class App {
    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }


//      <bean id="cacheUtil" class="com.platform.cache.CacheUtil"/>
//    <bean id="regionCacheUtil" class="com.platform.cache.RegionCacheUtil"/>
//    @Override
//    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
//        System.out.println("app start------------------------");
//        return application.sources(App.class);
//    }

//    @Bean
//    public WebMvcConfigurerAdapter adapter() {
//        return new WebMvcConfigurerAdapter() {
//            @Override
//            public void addInterceptors(InterceptorRegistry registry) {
//                registry.addInterceptor(new ExecTimeCostInterceptor()).addPathPatterns("/**");
//                registry.addInterceptor(new AuthInterceptor()).addPathPatterns("/**");
//                super.addInterceptors(registry);
//            }
//        };
//    }

    
}

